<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<link rel="stylesheet" type="text/css"
	href="manageView/assets/plugins/jstree/dist/themes/default/style.min.css" />
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed">


	<!-- BEGIN CONTAINER -->


	<!-- BEGIN CONTENT -->

	<!-- BEGIN PAGE HEADER-->

	<!-- END PAGE HEADER-->

	<div class="row">
		<div class="col-md-6">
			<div class="portlet box blue">
				<div class="portlet-title">
					<div class="caption">
						<a href="javascript:;" ng-click="addChildrenSubject();">新增子级</a> 
						<a href="javascript:;" data-target="#subjectModel"
							data-toggle="modal" ng-click="addPrevSubject();">新增同级</a> 
						<a href="javascript:;" ng-click="updateSubject();">修改</a>
					</div>
				</div>
				<div class="portlet-body ">
					<!-- <div class="dd" id="nestable_list_1">
								<ol class="dd-list">
									<subject-tree   tree-data="subjectList" >
									</subject-tree>	
								</ol>
							</div> -->
					<div id="subjectTree" class="tree-demo"></div>
				</div>
			</div>
		</div>
	</div>
	<div id="subjectModel" class="modal fade" role="dialog"
		aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">×</button>
					<h4 class="modal-title">账目类型维护</h4>
				</div>
				<div class="modal-body form">
					<div class="form-group">
						<div class="row">
							<label class="col-sm-3 control-label">科目编码</label>
							<div class="col-sm-9">
								<div class="input-group">
									<input type="text" ng-model="selectedSubject.subjectCode"
										class="form-control bValidate" key="required"
										ng-readonly="subjectCodeReadOnly||selectedSubject.parentSubjectCode=='#'" />
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label">科目名称</label>
							<div class="col-sm-9">
								<div class="input-group">
									<input type="text" ng-model="selectedSubject.subjectName"
										class="form-control bValidate" key="required" ng-readonly="selectedSubject.parentSubjectCode=='#'"/>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label">父级科目编码</label>
							<div class="col-sm-9">
								<div class="input-group">
									<input type="text" ng-model="selectedSubject.parentSubjectCode"
										ng-readonly="parentCodeReadOnly||selectedSubject.parentSubjectCode=='#'" class="form-control" />
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label">使用状态</label>
							<div class="col-md-9">
								<div class="input-group">
									<label class="radio-inline"> <input
										ng-model="selectedSubject.isValid" type="radio" value="1"
										ng-selected="selectedSubject.isValid==1"
										ng-disabled="selectedSubject.parentSubjectCode=='#'"> 启用
									</label> <label class="radio-inline"> <input
										ng-model="selectedSubject.isValid" type="radio" value="0"
										ng-selected="selectedSubject.isValid==0"
										ng-disabled="selectedSubject.parentSubjectCode=='#'"> 停用
									</label>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label">账户类型</label>
							<div class="col-md-9">
								<div class="input-group">
									<label class="radio-inline"> <input
										ng-model="selectedSubject.subjectType" type="radio" value="0"
										class="bValidate" key="required" name="subjectType"
										ng-selected="selectedSubject.subjectType==0"
										ng-disabled="typeReadOnly||selectedSubject.parentSubjectCode=='#'"> 资产
									</label> <label class="radio-inline"> <input
										ng-model="selectedSubject.subjectType" type="radio" value="1"
										name="subjectType"
										ng-selected="selectedSubject.subjectType==1"
										ng-disabled="typeReadOnly||selectedSubject.parentSubjectCode=='#'"> 损益
									</label> <label class="radio-inline"> <input
										ng-model="selectedSubject.subjectType" type="radio" value="2"
										name="subjectType"
										ng-selected="selectedSubject.subjectType==2"
										ng-disabled="typeReadOnly||selectedSubject.parentSubjectCode=='#'"> 负债
									</label> <label class="radio-inline"> <input
										ng-model="selectedSubject.subjectType" type="radio" value="3"
										name="subjectType"
										ng-selected="selectedSubject.subjectType==3"
										ng-disabled="typeReadOnly||selectedSubject.parentSubjectCode=='#'"> 所有者权益
									</label>
								</div>
							</div>
						</div>
					</div>

				</div>
				<div class="modal-footer">
					<button type="button" id="closeButton" class="btn btn-danger"
						data-dismiss="modal">
						<i class="fa fa-times"></i>关闭
					</button>
					<button type="button" class="btn btn-primary"
						ng-click="modifySubject();" ng-show="selectedSubject.parentSubjectCode!='#'">
						<i class="fa fa-check"></i>保存
					</button>
				</div>
			</div>
		</div>
	</div>


	<!-- END CONTENT -->

	<!-- END CONTAINER -->

	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->

	<!-- END PAGE LEVEL SCRIPTS -->
	<script src="manageView/assets/plugins/jstree/dist/jstree.min.js"></script>


	<!-- END PAGE LEVEL SCRIPTS -->

	<!-- END BODY -->
</html>